package org.ix.gateway.client;

import org.ix.gateway.client.model.GatewayRouteResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

@FeignClient(value = "gateway-route-service")
public interface RoutesClient {

    /**
     * 获取路由版本
     *
     * @return 路由版本
     */
    @GetMapping("/gateway-routes-version/get-last-version")
    Long getRoutesVersion() throws Exception;

    /**
     * 获取路由
     *
     * @return 路由列表
     */
    @GetMapping("/gateway-route/list?deleted=0")
    List<GatewayRouteResponse> getRoutes() throws Exception;
}
